#!/bin/bash

#设置全局email
#git config --global user.email "huajie.bao@transsnet.com@transsnet.com"
#设置全局name
#git config --global user.name "baohuajie"
#查看当前目录
SERVICE_DIR=`find ./ -maxdepth 1 -type d`;
#需要更新的分支
echo "请输入分支:"
read branch_to_pull;

for DIR in $SERVICE_DIR
do
	
	#去除./,只pull pc开头的项目
	str="pc"
	result=$(echo $DIR | grep "${str}")
	echo "===============================  $result START ============================================"
	if [[ "$result" != "" ]]; then
	cd /d/work/code/new/$DIR;
	git checkout $branch_to_pull;
	git pull;
	echo "-------------------------------  $result END PULL  ----------------------------------------"
	fi
	echo "===============================  $result END  ============================================"
done
